import store from './pinia';
import userStore from './modules/userStore';
import themeStore from './modules/themeStore';
import keepAliveStore from './modules/keepAliveStore';
import requestOldRoutesStore from './modules/requestOldRoutesStore';
import routesStore from './modules/routesStore';
import systemConfigStore from './modules/systemConfigStore';
import tagsViewStore from './modules/tagsViewStore';
import flowStore from './modules/flowStore';
import serviceFlowStore from './modules/serviceFlowStore';

export const user = userStore(store);
export const theme = themeStore(store);
export const keepAlive = keepAliveStore(store);
export const requestOldRoutes = requestOldRoutesStore(store);
export const routes = routesStore(store);
export const systemConfig = systemConfigStore(store);
export const tagsView = tagsViewStore(store);
export const flow = flowStore(store);
export const serviceFlow = serviceFlowStore(store);
/**
 * 注册app状态库
 */
const appStore = {
	user: user,
	theme: theme,
	keepAlive: keepAlive,
	requestOldRoutes: requestOldRoutes,
	routes: routes,
	systemConfig: systemConfig,
	tagsView: tagsView,
	flow: flow,
	serviceFlow: serviceFlow,
};

export default appStore;
